package com.gxa.core.recycling.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

//商品兑换订单表
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "goodsorder")   //创建数据表注解
@Entity   //ORM 对象关系映射的关键主键
public class Goodsorder implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;
    @Column(name = "gid")
    //商品id
    private Long gid;
    @Column(name = "number")
    //订单数量
    private Integer number;
    @Column(name = "words")
    //买家留言
    private String words;
    @Column(name = "total")
    //总积分
    private Integer total;
    @Column(name = "exchangetime")
    //兑换时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date exchangetime;
    @Column(name = "state")
    //交互状态
    private String state;
    @Column(name = "code")
    //上门的验证码或者说随机码
    private String code;
    @Column(name = "uid")
    //用户id
    private Long uid;
    @Column(name = "recyclerName")
    //回收员名字
    private String recyclerName;
    //服务地址id（收货位置）
    @Column(name = "locationId")
    private Long locationId;




}
